3.10.95 \(\int \frac {(A+B x) (d+e x)}{b x+c x^2} \, dx\)

Optimal. Leaf size=45 \[ \frac {(b B-A c) (c d-b e) \log (b+c x)}{b c^2}+\frac {A d \log (x)}{b}+\frac {B e x}{c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {771} \begin {gather*} \frac {(b B-A c) (c d-b e) \log (b+c x)}{b c^2}+\frac {A d \log (x)}{b}+\frac {B e x}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x))/(b*x + c*x^2),x]

[Out]

(B*e*x)/c + (A*d*Log[x])/b + ((b*B - A*c)*(c*d - b*e)*Log[b + c*x])/(b*c^2)

Rule 771

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {(A+B x) (d+e x)}{b x+c x^2} \, dx &=\int \left (\frac {B e}{c}+\frac {A d}{b x}-\frac {(b B-A c) (-c d+b e)}{b c (b+c x)}\right ) \, dx\\ &=\frac {B e x}{c}+\frac {A d \log (x)}{b}+\frac {(b B-A c) (c d-b e) \log (b+c x)}{b c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 46, normalized size = 1.02 \begin {gather*} \frac {-(b B-A c) (b e-c d) \log (b+c x)+A c^2 d \log (x)+b B c e x}{b c^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x))/(b*x + c*x^2),x]

[Out]

(b*B*c*e*x + A*c^2*d*Log[x] - (b*B - A*c)*(-(c*d) + b*e)*Log[b + c*x])/(b*c^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) (d+e x)}{b x+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(d + e*x))/(b*x + c*x^2),x]

[Out]

IntegrateAlgebraic[((A + B*x)*(d + e*x))/(b*x + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 57, normalized size = 1.27 \begin {gather*} \frac {B b c e x + A c^{2} d \log \relax (x) + {\left ({\left (B b c - A c^{2}\right )} d - {\left (B b^{2} - A b c\right )} e\right )} \log \left (c x + b\right )}{b c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+b*x),x, algorithm="fricas")

[Out]

(B*b*c*e*x + A*c^2*d*log(x) + ((B*b*c - A*c^2)*d - (B*b^2 - A*b*c)*e)*log(c*x + b))/(b*c^2)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 59, normalized size = 1.31 \begin {gather*} \frac {B x e}{c} + \frac {A d \log \left ({\left | x \right |}\right )}{b} + \frac {{\left (B b c d - A c^{2} d - B b^{2} e + A b c e\right )} \log \left ({\left | c x + b \right |}\right )}{b c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+b*x),x, algorithm="giac")

[Out]

B*x*e/c + A*d*log(abs(x))/b + (B*b*c*d - A*c^2*d - B*b^2*e + A*b*c*e)*log(abs(c*x + b))/(b*c^2)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 68, normalized size = 1.51 \begin {gather*} \frac {A d \ln \relax (x )}{b}-\frac {A d \ln \left (c x +b \right )}{b}+\frac {A e \ln \left (c x +b \right )}{c}-\frac {B b e \ln \left (c x +b \right )}{c^{2}}+\frac {B d \ln \left (c x +b \right )}{c}+\frac {B e x}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)/(c*x^2+b*x),x)

[Out]

B*e*x/c+1/c*ln(c*x+b)*A*e-1/b*ln(c*x+b)*A*d-1/c^2*b*ln(c*x+b)*B*e+1/c*ln(c*x+b)*B*d+A*d*ln(x)/b

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 57, normalized size = 1.27 \begin {gather*} \frac {B e x}{c} + \frac {A d \log \relax (x)}{b} + \frac {{\left ({\left (B b c - A c^{2}\right )} d - {\left (B b^{2} - A b c\right )} e\right )} \log \left (c x + b\right )}{b c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+b*x),x, algorithm="maxima")

[Out]

B*e*x/c + A*d*log(x)/b + ((B*b*c - A*c^2)*d - (B*b^2 - A*b*c)*e)*log(c*x + b)/(b*c^2)

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 58, normalized size = 1.29 \begin {gather*} \frac {B\,e\,x}{c}-\ln \left (b+c\,x\right )\,\left (\frac {A\,d}{b}-\frac {c\,\left (A\,b\,e+B\,b\,d\right )-B\,b^2\,e}{b\,c^2}\right )+\frac {A\,d\,\ln \relax (x)}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(d + e*x))/(b*x + c*x^2),x)

[Out]

(B*e*x)/c - log(b + c*x)*((A*d)/b - (c*(A*b*e + B*b*d) - B*b^2*e)/(b*c^2)) + (A*d*log(x))/b

________________________________________________________________________________________

sympy [B]  time = 1.36, size = 88, normalized size = 1.96 \begin {gather*} \frac {A d \log {\relax (x )}}{b} + \frac {B e x}{c} - \frac {\left (- A c + B b\right ) \left (b e - c d\right ) \log {\left (x + \frac {A b c d + \frac {b \left (- A c + B b\right ) \left (b e - c d\right )}{c}}{- A b c e + 2 A c^{2} d + B b^{2} e - B b c d} \right )}}{b c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x**2+b*x),x)

[Out]

A*d*log(x)/b + B*e*x/c - (-A*c + B*b)*(b*e - c*d)*log(x + (A*b*c*d + b*(-A*c + B*b)*(b*e - c*d)/c)/(-A*b*c*e +
 2*A*c**2*d + B*b**2*e - B*b*c*d))/(b*c**2)

________________________________________________________________________________________